/lib/unum posit jets: hints, vere reference, valids appendix, benchmarks#65
Open
sigilante wants to merge 9 commits into
Open
/lib/unum posit jets: hints, vere reference, valids appendix, benchmarks#65sigilante wants to merge 9 commits into
sigilante wants to merge 9 commits into
Conversation
…ndix - libmath/desk/lib/unum.hoon: jet hints (~% %non ..part ~, ~/ %unum on ++pp, ~/ %add on the add arm) so the posit core registers for jetting, mirroring /lib/math. - libmath/vere/noun/jets/i/unum.c: reference (master) copy of the posit add jet (bloq-dispatch on SoftUnum), hand-mirrored into urbit/vere; plus libmath/vere/README.md documenting the vere-side wiring (ext/softunum vendoring, w.h/q.h decls, 135/136/137 registration). - libmath/NEXT-STEPS.md: appendix assessing valids (Type-III interval unums) -- what they are, the directed-rounding primitive needed, open design questions (layout, projective-vs-bounded, set ops), and the harder verification posture. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…only ship note Sync the marker-free reference unum.c and document that add:rpb/rph/rps fire bit-exact on a live hoon-135 fakezod. Clarify that only the 135 dashboard registration ships (we ship to the lowest/current kelvin); 136/137 edits are local test-only scaffolding. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…/abs/sgn/sqt/fma) Add ~/ jet hints to the scalar arms of /lib/unum (sub mul div, lth lte gth gte equ neq, neg abs sgn, sqt, fma) and sync the reference unum.c (macro-based bloq-dispatch wrappers). Verified firing bit-exact on a hoon-135 fakezod across posit8/16/32. Only the 135 dashboard registration ships. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…pow-n) Hint the elementary/transcendental arms of /lib/unum and sync the reference unum.c. Verified firing bit-exact on a hoon-135 fakezod across posit8/16/32. Constants remain pure Hoon. Only the 135 dashboard ships. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ync reference rnd/flr/cel eta-expanded to |= gates wrapping +round (behavior-identical, now jettable); hint sun/san/toi/is-close. Verified firing bit-exact on hoon-135 across posit8/32, matching the Hoon round/convert test vectors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…d/rq) Hint to-rh/rs/rd/rq and from-rh/rs/rd/rq; sync reference unum.c. Verified firing bit-exact on hoon-135 against the test-ieee vectors (cross-width + the binary128 2-chub round-trip). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ce complete Hint p-to-q/q-to-p/q-mul-add/q-mul-sub/q-add-p/q-sub-p/q-add-q/q-sub-q/q-negate/ fdp; sync reference unum.c. Verified firing bit-exact on hoon-135 (test-quire-rpb / test-fdp-rpb). All 54 /lib/unum arms now jetted across posit8/16/32. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s jetted) Mirror the bench-math protocol for posits: lib/unum-cells (per-(door,arm) timing cell, one %*-specialized pp door covers posit8/16/32), gen/bench-unum + gen/bench-unum-grid, and tools/bench_unum_report.py (scrapes the %bout grids, adds a Python/SoftUnum ctypes column, prints per-call times + jet-vs-interp speedup). One jet binary, hint-toggle for jetted vs interpreted. Results (results/2026-06-28/unum, hoon-135 fakezod): arithmetic ~180-295x, transcendentals ~760-2000x, fdp ~760-2300x faster jetted than interpreted. Noted caveat: posit16/32 sqt/atan are slow even jetted (512-bit wide_t bit-by-bit isqt -- a future optimization target). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Record current status (SoftUnum + the full /lib/unum jet surface done, PRs numerics #65 / vere #1046) and the prioritized roadmap: land PRs; posit quire-GEMM for Lagoon/Saloon linear algebra (the high-value item); fix the posit16/32 sqt/atan wide-isqt outlier; extend SoftUnum to posit64/128; range-reduced/quire-accumulated transcendentals; alias layer; valids; Rust SoftUnum; upstream to urbit/SoftUnum; decimal printer. Mark old section 5 (Jets) done. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jet-enables the pure-Hoon
/lib/unum(2022 Posit Standard) and adds thesupporting reference + benchmarks. Pairs with the vere PR that vendors
SoftUnum (
ext/softunum) and adds thenon/unumjets.What's here (numerics side)
libmath/desk/lib/unum.hoon— jet hints (~% %non ..part ~,~/ %unumon
++pp,~/ %<arm>on every jetted arm).rnd/flr/celareeta-expanded into
|=gates wrapping+round(behaviour-identical, nowjettable); constants stay pure Hoon. All 54 arms hinted across
posit8/16/32 (
rpb/rph/rps).libmath/vere/noun/jets/i/unum.c+libmath/vere/README.md— thereference (master) copy of the jet, hand-mirrored into vere, documenting the
vere-side wiring. Only the hoon-135 (lowest/shippable kelvin) registration
ships.
libmath/NEXT-STEPS.md— appendix assessing valids (Type-III intervalunums): what they are, the directed-rounding primitive needed, open design
questions, and the (harder) verification posture.
benchmark/—lib/unum-cells+gen/bench-unum{,-grid}+tools/bench_unum_report.py, mirroring thebench-mathprotocol; results inbenchmark/results/2026-06-28/unum/.Verification
Every arm fires bit-exact on a live hoon-135 fakezod across posit8/16/32,
checked against the
/lib/unumtest vectors (test-round-rpb,test-convert-rpb,test-ieee-*,test-quire-rpb,test-fdp-rpb, transcendental vectors).Benchmarks (jetted vs interpreted)
arithmetic ~180–295×, transcendentals ~760–2000×, fused dot product ~760–2300×
faster jetted. Caveat: posit16/32
sqt/atanare slow even jetted (512-bitwide_tbit-by-bitisqt) — a future optimization target.🤖 Generated with Claude Code